﻿/// <reference path="../../../Scripts/jquery-1.7.1-vsdoc.js" />

if (typeof (Solution) == 'undefined') Solution = {};
if (typeof (Solution.Admin) == 'undefined') Solution.Admin = {};
Solution.Admin.SysAccount = {
    Init: function () {
    },
    LogOff: function (ActUrl, UrlRedirect) {
        var _alert = 'do you want logout?';
        jConfirm(_alert, '~', function (r) {
            if (r) {
                $.ajax({
                    url: ActUrl,
                    data: {},
                    type: 'POST',
                    contentType: 'application/json; charset=utf-8',
                    dataType: 'json',
                    success: function (result) {
                        console.log(result);
                        if (result == 'ok') {
                            Solution.Core.Redirect(UrlRedirect);
                        }
                    }
                });
            }
        });
    }
}